package core

import (
	"gitlab.local/DO-module/new-filemanage-module/src/constant"
)

func (t *TOS) GetTimeFormat() (string, string) {
	dateFormat, _ := t.configService.GetString("dateformat")
	timeFormat, _ := t.configService.GetString("timeformat")
	dateLayout, ok := constant.LayoutsDate[dateFormat]
	if !ok {
		dateLayout = constant.LayoutsDate["%Y/%m/%d"]
	}
	timeLayout, ok := constant.LayoutsTime[timeFormat]
	if !ok {
		timeLayout = constant.LayoutsTime["24"]
	}
	return dateLayout, timeLayout
}
